package com.fowo.api.model.supplier.flow;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fowo.api.entity.SupplierFlowNode;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.Accessors;
import lombok.experimental.FieldNameConstants;

import java.util.Date;
import java.util.List;

@Getter
@Setter
@Accessors(chain = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
@Builder
@NoArgsConstructor
@AllArgsConstructor
@FieldNameConstants
@Schema(title = "事务上下文")
public class ContextSupplierFlow {

    // 流程实体
    private SupplierFlowItemVo flowEntity;
    // 节点实体
    private SupplierFlowNode nodeEntity;
    // 状态
    private String status;
    // 表单ID
    private Long formId;

    public ContextSupplierFlow(SupplierFlowItemVo flowEntity, SupplierFlowNode nodeEntity, String status) {
        this.nodeEntity = nodeEntity;
        this.flowEntity = flowEntity;
        this.status = status;
    }

    // 发送给的用户列表
    private List<Long> toUserList;
    // 转发的用户列表
    private Long forwardUser;
    // 结束时间
    private Date endTime;
    // 代码
    private String code;
    // 标题
    private String title;
}